<?php
/**  web/rebuild/yyl/emp/js/emp.js 发来的异步请求  修改市场部人员的区域配置
 * Created by PhpStorm.
 * User: KaZeline
 * Date: 15-10-21
 * Time: 上午9:17
 */
//只有燕枚可以操作
//echo '<pre>';
//print_r($_POST);
//echo '</pre>';exit;
//exit;
if($_SESSION['account']!='csj1' && $_SESSION['account']!='yami' && $_SESSION['account']!='yipiao')  exit();


foreach($_POST as$k=> $v){//$k 是员工编码
    if(is_array($v['list']))
    foreach($v['list'] as$key=> $val){
        $chenping[$key][] = $k;
    }
}

file_put_contents('emp.json',json_encode($_POST));
file_put_contents('chenping.json',json_encode($chenping));
echo 'ok';exit;